package com.kingwang.training.designpattern.decorator.bo;

public class Sugar extends AbstractDecorator {
    private Double sugarCost = 3.0;

    private String sugarName = "加糖";

    public Sugar(Drinkable drink) {
        super(drink);
    }

    @Override
    public Double cost() {
        return super.cost() + this.sugarCost;
    }

    @Override
    public String info() {
        return super.info() + this.sugarName;
    }
}
